package trlygjj.tanruiliyigenjinjin.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import trlygjj.tanruiliyigenjinjin.util.StringUtil;

import java.util.Date;

/**
 * Created by user on 2018/7/7.
 */

/**
 * 查询条件的父类
 */
@Setter
@Getter
public class PotentialCustomerQueryObject extends QueryObject {


    //在客户资源池中
    public static final int INPOOL_STATE=1;
    //不在客户资源池中
    public static final int OUTPOOL_STATE=0;


    //根据客户名 营销员 qq做关键字查询

    private String keywords;
    //客户资源池状态
    private int  inpoolState=OUTPOOL_STATE;
    //根据录入的开始时间查询
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    //根据录入的结束时间查询
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    public String getKeywords(){
        if (StringUtil.hasLength(keywords)){
            return keywords;
        }
        return null;
    }
}
